#include "stdafx.h"

#include "hwincomcontrolsite.h"

namespace harlinn
{
    namespace windows
    {


        HWIN_EXPORT HRESULT ComControlSite::GetWindow(HWND *phwnd)
        {
            *phwnd = nullptr;
            std::shared_ptr<Control> theControl = InternalObject<Control>();
            if(theControl->IsHandleCreated())
            {
                *phwnd = theControl->GetSafeHandle();
                return S_OK;
            }
            return E_FAIL;
        }
        HWIN_EXPORT HRESULT ComControlSite::ContextSensitiveHelp(BOOL fEnterMode)
        {
            return E_NOTIMPL;
        }

        // IOleClientSite
        HWIN_EXPORT HRESULT ComControlSite::SaveObject( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetMoniker( DWORD dwAssign,DWORD dwWhichMoniker,IMoniker **ppmk)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetContainer( IOleContainer **ppContainer)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::ShowObject( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnShowWindow( BOOL fShow)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::RequestNewObjectLayout( )
        {
            return E_NOTIMPL;
        }

        // IOleControlSite
        HWIN_EXPORT HRESULT ComControlSite::OnControlInfoChanged( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::LockInPlaceActive( BOOL fLock)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetExtendedControl( IDispatch **ppDisp)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::TransformCoords( POINTL *pPtlHimetric,POINTF *pPtfContainer, DWORD dwFlags)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::TranslateAccelerator( MSG *pMsg,DWORD grfModifiers)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnFocus( BOOL fGotFocus)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::ShowPropertyFrame( )
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::CanInPlaceActivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnInPlaceActivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnUIActivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetWindowContext( IOleInPlaceFrame **ppFrame,IOleInPlaceUIWindow **ppDoc,LPRECT lprcPosRect,LPRECT lprcClipRect,LPOLEINPLACEFRAMEINFO lpFrameInfo)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::Scroll( SIZE scrollExtant)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnUIDeactivate( BOOL fUndoable)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnInPlaceDeactivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::DiscardUndoState( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::DeactivateAndUndo( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnPosRectChange( LPCRECT lprcPosRect)
        {
            return E_NOTIMPL;
        }

        // IAdviseSinkImpl
        HWIN_EXPORT void ComControlSite::OnDataChange( FORMATETC *pFormatetc,STGMEDIUM *pStgmed)
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnViewChange( DWORD dwAspect,LONG lindex)
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnRename( IMoniker *pmk)
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnSave( )
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnClose( )
        {
            
        }


        // IOleUIObjInfo
        HWIN_EXPORT HRESULT ComControlSite::GetObjectInfo(DWORD dwObject,DWORD* lpdwObjSize, LPWSTR * lplpszLabel,LPWSTR FAR* lplpszType, LPWSTR * lplpszShortType,LPWSTR * lplpszLocation)
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::GetConvertInfo(DWORD dwObject,
                                            CLSID * lpClassID, WORD * lpwFormat,
                                            CLSID * lpConvertDefaultClassID,
                                            LPCLSID * lplpClsidExclude, UINT * lpcClsidExclude)
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::ConvertObject(DWORD dwObject, REFCLSID clsidNew)
        {
            return E_NOTIMPL;
        }

            
        HWIN_EXPORT HRESULT ComControlSite::GetViewInfo (DWORD dwObject,HGLOBAL * phMetaPict, DWORD* pdvAspect, int* pnCurrentScale)
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::SetViewInfo (DWORD dwObject,HGLOBAL hMetaPict, DWORD dvAspect,int nCurrentScale, BOOL bRelativeToOrig)
        {
            return E_NOTIMPL;
        }


        // IOleDocumentSite
        HWIN_EXPORT HRESULT ComControlSite::ActivateMe(IOleDocumentView *pViewToActivate)
        {
            return E_NOTIMPL;
        }



    }
}